Archive Service
Introduction
Archive Microservice is service from Signing Services collection that organizes such important features as:
- Core document management functions like:
- Add new document
- Update document
- Remove document
- Download document
- Search document
- Based on configuration / integration settings, the service could provide connection to 3d party DMS systems in order to organize document management there. In a default scenario service is using a local drive for document storage.
- In order if a storage provider has some issues, archive service in cooperation with a fallback service allows it to work as usual and, in the background, when the storage provider is live again, to process all collected activities that have happened during the unavailability period.
Package content
- Microservice package location:
/DMSS/dmss-archive-services/
. - Microservice delivery package includes a separate folder for each microservice having the same name as microservice
executable
.jar
file. Each microservice has a configurationapplication.yml
file that should be adjusted to fit client needs. Archive microservice package (folderdmss-archive-services
) includes:dmss-archive-services.jar
– java archive package file. More details about JAR file format could be found here: https://en.wikipedia.org/wiki/JAR_(file_format).application.yml
– archive service configuration file. More details about the.yml
file format could be found here: https://en.wikipedia.org/wiki/YAML.
Configuration
In YAML configuration whitespace indentation is used for denoting structure. Table below is showing Archive microservice
application.yml
configuration parameters.
Name | Description | Default Value |
---|---|---|
spring.http.multipart.max-file-size | File size that could not be exceeded for http requests. | 100Mb |
spring.http.multipart.max-request-size | Total request size that could not be exceeded for http requests. | 100Mb |
spring.servlet.multipart.max-file-size | File size that could not be exceeded for servlet. | 100Mb |
spring.servlet.multipart.max-request-size | Total request size that could not be exceeded for servlet. | 100Mb |
servlet.port | Port that will be used for microservice running. | 8090 |
management.security.enabled. | Security features. | false |
authentication.jwt.validation | Enable or disable jwt validation. | true |
authentication.jwt.headerName | Jwt header name. | true |
authentication.jwt.systemCode NameInClaim | ||
authentication.jwt.private | ||
certificate Service.cron | ||
certificate Service.url | Certificate service url. | http://localhost:11111/cert |
certificate.authentication.basic.username | ||
certificate.authentication.basic.password | ||
log.requests | Enable or disable request logging. | false |
openText | Configuration section in case of microservice is connected to OpenText Content Server product. | |
openText.transformSpec JsonPath | ||
openText.transformSpec JsonPath.categories | ||
openText.transformSpec JsonPath.docBody | ||
openText.baseUrl | Content server base url. | https://demo.trustlynx.com/otcs/llisapi.dll/api |
openText.rootRelativeUrl | ||
openText.rootRelativeUrl.auth | OTCS auth API. | /v1/auth |
openText.rootRelativeUrl.nodeByName | OTCS get node by name API. | /v2/nodes/%s/nodes |
openText.rootRelativeUrl.nodeById | OTCS get node by id API. | /v2/nodes/%s/ |
openText.rootRelativeUrl.document | OTCS get document API. | /v2/nodes |
openText.rootRelativeUrl.downloadVersion | OTCS download document version API. | /v1/nodes/%s/versions/%s/content |
openText.rootRelativeUrl.getVersions | OTCS get document versions API. | /v2/nodes/%s/version |
openText.rootRelativeUrl.getLatest Version | OTCS get last document version API. | /v1/nodes/%s/versions/latest |
openText.rootRelativeUrl.addCategoryPath | OTCS add category API. | /v1/nodes/%s/categories |
openText.rootRelativeUrl.updateCategoryPath | OTCS update category API. | /v1/nodes/%s/categories/%s |
openText.rootRelativeUrl.addDocument VersionPath | OTCS add document version API. | /v1/nodes/%s/versions |
openText.rootRelativeUrl.updateNode | OTCS update node API. | /v1/nodes/%s |
openText.authentication.defaultSystemCode | ||
openText.authentication.basic | ||
openText.authentication.basic.username | ||
openText.authentication.basic.password | ||
openText.authentication.systemAuth Configurations | ||
openText.authentication.systemAuth Configurations.name | ||
openText.authentication.systemAuth Configurations.username | ||
openText.authentication.systemAuth Configurations.password | ||
logging.config | Log file configuration xml path. | D:/DMSS/dmss-archive-services/logback.xml |
logging.level | ||
logging.level.root | Logging level. | info / debug / trace |
spring.profiles | Spring Profiles provide a way to segregate parts of your application configuration and make it only available in certain environments. | staging / production |
Running
It is recommended to use OpenJDK 11 (typically installed at /usr/lib/jvm/java-11-openjdk
) for microservices execution.
Service execution command:
java -jar /opt/DMSS/dmss-archive-services/dmss-archive-services.jar --spring.config.location=/opt/DMSS/dmss-archive-services/application.yml
These commands could be organized to run simultaneously as service / task scheduler based on OS and its possibilities (for example for windows – service startup commands could be organized in powershell script running on a system startup, for Linux – background service). The way how these commands are organized for running is decided individually by the solution owner.
Debugging
In section 3 microservice has logging -> config setting that defines path to logback.xml
file. This XML file has
an appender section that defines location of log files. Example of such section is:
In the current example logs are stored inside /opt/DMSS/logs/
folder. To define logging level for specific microservice,
open corresponding application.yaml
file and change logging -> level -> root setting to info / debug / trace
based on needs.
External resources
Archive microservice has no special external resource availability requirements. If the service is connected to a 3d party document management system or integrated to an external archive, connection between these systems should be implemented.
Postman collection examples
Archive Microservice documentation package includes POSTMAN collection
Document Changelog
Version | Changes | Date | Changed By |
---|---|---|---|
v1.0.0 | Initial version of User Manual | 25.08.2021 | Mihails Gordijenko |